package airlinesystem;

import java.sql.Time;
import java.util.Date;

/**
 * Tests the Airline System
 * @author Robert Maaskant & Dennis van der Zwet
 *
 */
public class TestAirlineSystem
{

  public static void main(String[] args)
  {
    Airline a = new Airline("A");
    Person p1 = new Person("p1");
    PassengerRole pr1 = new PassengerRole(p1);
    Person p2 = new Person("p2");
    PassengerRole pr2 = new PassengerRole(p2);
    RegularFlight r1 = a.createRegularFlight(new Time(9, 30, 00), 123);
    SpecificFlight f1 = a.createSpecificFlight(new Date(), r1);
    SpecificFlight f2 = a.createSpecificFlight(new Date(2000,12,30), r1);
    Booking b1 = a.createBooking(pr1, f1);
    Booking b2 = a.createBooking(pr2, f1);
    Booking b3 = a.createBooking(pr2, f2);
    
    System.out.println(a.findBookingsByPassenger(pr1).contains(b1));
    System.out.println(!a.findBookingsByPassenger(pr1).contains(b2));
    System.out.println(a.findBookingsByPassenger(pr2).contains(b3));
  }

}
